#include "Shield.h"
#include "MovingObject.h"
#include "Player.h"
#include "DestroyGameObjectMessage.h"
#include "../SGD Wrappers/SGD_GraphicsManager.h"
#include "Game.h"

Shield::Shield()
{
	m_hImage = SGD::GraphicsManager::GetInstance()->LoadTexture("resource/Graphics/Shield.png");
}
Shield::~Shield()
{
	SGD::GraphicsManager::GetInstance()->UnloadTexture(m_hImage);
}
void Shield::HandleCollision(GameObject* pOther)
{
	if (pOther->GetType() == MovingObject::OBJ_PLAYER) // Pick up the health;
	{

		DestroyGameObjectMessage * Msg = new DestroyGameObjectMessage{ this };
		Msg->QueueMessage();
		Msg = nullptr;

	}
}
void Shield::Render(void)
{
	StaticObject::Render();
}

